/**
 * 
 */
package com.security.frame.core.social;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.web.DefaultRedirectStrategy;
import org.springframework.security.web.RedirectStrategy;
import org.springframework.web.servlet.view.AbstractView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * todo
 *
 * @author wangjie
 * @version V1.0
 * @date 2019/11/7
 */
@Slf4j
public class MyConnectView extends AbstractView {

	private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();

	@Override
	protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request,
			HttpServletResponse response) throws Exception {



		log.info("【model】：{}",JSON.toJSONString(model));
		log.info("【request】：{}",request.toString());

		redirectStrategy.sendRedirect(request, response, "/index.html");

	}

}
